package org.jeecg.modules.simulator.recorder;

import lombok.Getter;
import lombok.Setter;
import org.jeecg.modules.simulator.factory.train.plan.TrainActionRDSFactory;
import org.jeecg.modules.simulator.model.line.plan.TrainPlanTablePath;
import org.jeecg.modules.simulator.model.train.action.TrainActionRecorders;

import java.util.Map;

/**
 * @program: simulator-b20240918
 * @description:
 * @author: renzhg
 * @create: 2024-11-29 15:56
 **/
public class TrainManagerAllDayIniter {

    @Getter
    @Setter
    String lineId;

    //  列车时刻表转换成列车动作记录表
    public Map<String, TrainActionRecorders> allDayTimeParkTrainActionRDsMap(Map<String, TrainPlanTablePath> trainPlanTablePathMap) {
        Map<String, TrainActionRecorders> trainActionRecorders = createTrainActionRecorders(trainPlanTablePathMap);

        return trainActionRecorders;

    }

    /**
     * @description: 时刻表装配动作记录集合
     * @author: renzhg
     * @date: 2024/9/19 9:19
     * @param:
     * @return:
     * @return: java.util.Map<java.lang.String, com.renzhg.gp.gp.simulator.model.train.action.TrainActionRecorders>
     **/
    public Map<String, TrainActionRecorders> createTrainActionRecorders(Map<String, TrainPlanTablePath> trainPlanTablePathMap) {
        return TrainActionRDSFactory.createTrainActionRecorders(trainPlanTablePathMap, this.getLineId());
    }

    public void init(String lineId) {
        this.lineId = lineId;
    }



}
